USE [CodeStash]
GO

/****** Object:  Table [dbo].[CodeSnippetForumMessage]    Script Date: 05/08/2012 20:18:16 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[CodeSnippetForumMessage](
	[CodeSnippetForumMessageId] [int] IDENTITY(1,1) NOT NULL,
	[MessageText] [nvarchar](max) NOT NULL,
	[AspNetMembershipUserId] [uniqueidentifier] NOT NULL,
	[Created] [datetime] NOT NULL,
	[CodeSnippetId] [int] NOT NULL,
 CONSTRAINT [PK_CodeSnippetForumMessage] PRIMARY KEY CLUSTERED 
(
	[CodeSnippetForumMessageId] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

ALTER TABLE [dbo].[CodeSnippetForumMessage]  WITH CHECK ADD  CONSTRAINT [FK_CodeSnippetForumMessage_CodeSnippet] FOREIGN KEY([CodeSnippetId])
REFERENCES [dbo].[CodeSnippet] ([CodeSnippetId])
GO

ALTER TABLE [dbo].[CodeSnippetForumMessage] CHECK CONSTRAINT [FK_CodeSnippetForumMessage_CodeSnippet]
GO


